from flask import Flask, jsonify
from celery_tasks.task01 import send_email
from celery_tasks.task02 import send_file
from celery_tasks.task03 import send_msg

app = Flask(__name__)

@app.route("/")
def index():
    resulf = send_email.delay("yuan")
    print(resulf.id)
    print(resulf)
    return "hello"

@app.route("/send_file")
def do_send_file():
    resulf = send_file.delay("hhhh")
    print(resulf.id)
    print(resulf)
    return "send_file"

@app.route("/1")
def do_send_test():
    resulf = send_msg.delay("0000")
    print(resulf.id)
    print(resulf)
    return "send_file"


if __name__ == "__main__":
    app.run(debug=True)